﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>易买网 - 首页</title>
    <link type="text/css" rel="stylesheet" th:href="@{/css/style.css}"/>
    <script type="text/javascript" th:src="@{/scripts/function.js}"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("a[disabled=disabled]").removeAttr("href");
        });
    </script>
</head>
<body>
<div id="header" class="wrap">
    <div id="logo"><img th:src="@{/images/logo.gif}"/></div>
    <div class="search" th:include="search :: search-frm">
    </div>
    <div class="help">
            <span style="color: #fc7e31;"
                  th:text="${session.lgnUser!=null?'亲，'+session.lgnUser.euUserName+'欢迎回来！':'请先登录'}"></span>
        <a th:href="@{/car/to_shopping}" class="shopping">购物车
            <span th:text="${session.car==null?'(0)':'('+session.car.size()+')'}"></span>
        </a>
        <a th:href="@{/user/to_login}">登录</a><a href="register.html">注册</a><a
            th:href="@{/comment/list}">留言</a></div>

    <div class="navbar">
        <ul class="clearfix">
            <li class="current"><a href="#">首页</a></li>
            <li><a href="#">图书</a></li>
            <li><a href="#">百货</a></li>
            <li><a href="#">品牌</a></li>
            <li><a href="#">促销</a></li>
        </ul>
    </div>
</div>
<div id="childNav">
    <div class="wrap">
        <ul class="clearfix">
            <li class="first"><a href="#">音乐</a></li>
            <li><a href="#">影视</a></li>
            <li><a href="#">少儿</a></li>
            <li><a href="#">动漫</a></li>
            <li><a href="#">小说</a></li>
            <li><a href="#">外语</a></li>
            <li><a href="#">数码相机</a></li>
            <li><a href="#">笔记本</a></li>
            <li class="last"><a href="#">Investor Relations</a></li>
        </ul>
    </div>
</div>
<div id="main" class="wrap">
    <div class="lefter">
        <div class="box" th:include="category :: category-box">
        </div>
        <div class="spacer"></div>
        <div class="last-view">
            <h2>最近浏览</h2>
            <dl class="clearfix">
                <dt><img th:src="@{/images/product/0_tiny.gif}"/></dt>
                <dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
                <dt><img th:src="@{/images/product/0_tiny.gif}"/></dt>
                <dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
            </dl>
        </div>
    </div>
    <div class="main">

        <div class="price-off">
            <h2>商品列表</h2>
            <ul class="product clearfix">
                <li th:each="pro :  ${resultMap.productPage.getRecords()}">
                    <dl>
                        <dt><a th:href="@{/product/detail(pid=${pro.epId})}" target="_blank"><img
                                th:src="@{'/images/product/'+${pro.epFileName}}"/></a></dt>
                        <dd class="title">
                            <a th:href="@{/product/detail(pid=${pro.epId})}" target="_blank" th:text="${pro.epName}">法国德菲丝松露精品巧克力500g/盒</a>
                        </dd>
                        <dd class="price" th:text="${'￥'+pro.epPrice}">￥108.0</dd>
                    </dl>
                </li>

            </ul>

            <div class="pager">
                <ul class="clearfix">
                    <li><a
                            th:disabled="${resultMap.productPage.getCurrent()==1?'true':'false'}"
                            th:style="${resultMap.productPage.getCurrent()==1?
							'cursor:no-drop;text-decoration: none;color: #c4c4c4;':''}"
                            th:href="@{/index/index(pnum=${resultMap.productPage.getCurrent()-1})}">上一页</a></li>
                    <li th:class="${num==resultMap.productPage.getCurrent()?'current':''}"
                        th:each="num  : ${#numbers.sequence(1,resultMap.productPage.getPages())}">
                        <a th:href="@{/index/index(pnum=${num})}" th:text="${num}">1</a>
                    </li>

                    <li><a
                            th:disabled="${resultMap.productPage.getCurrent()==resultMap.productPage.getPages()?'true':'false'}"
                            th:style="${resultMap.productPage.getCurrent()==resultMap.productPage.getPages()?
							'cursor:no-drop;text-decoration: none;color: #c4c4c4;':''}"
                            th:href="@{/index/index(pnum=${resultMap.productPage.getCurrent()+1})}">下一页</a></li>
                </ul>
            </div>

        </div>
        <div class="side">
            <div class="spacer"></div>
            <div class="news-list">
                <h4>新闻动态</h4>
                <ul>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                    <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
                </ul>

            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div id="footer">
    Copyright &copy; 2016 湖南软测信息技术有限公司 All Rights Reserved. 湘ICP证1001号
</div>
</body>
</html>
